﻿using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using Bookvar.ObjectModel;

namespace Bookvar.Collaboration
{
    [DataContract]
    public class UserJoinResponse
    {
        private CollaborationUser currentUser;
        private CollaborationUser[] users;

        /// <summary>
        /// Gets or sets all users that participate in the current collaboration session.
        /// </summary>
        /// <value>The users.</value>
        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Used in serialization")]
        [DataMember]
        public CollaborationUser[] Users
        {
            get
            {
                return users;
            }
            set
            {
                users = value;
            }
        }

        /// <summary>
        /// Gets or sets the current user that joined the collaboration.
        /// </summary>
        /// <value>The current user.</value>
        [DataMember]
        public CollaborationUser CurrentUser
        {
            get
            {
                return currentUser;
            }
            set
            {
                currentUser = value;
            }
        }
    }
}